#ifndef __RYMC_HELPER_H_
#define __RYMC_HELPER_H_
#include "x_http_helper.h"
#include "x_timer.h"
#include "DeviceControl.h"

class CRymcHelper
{
public:
	CRymcHelper();
	~CRymcHelper();

public:
	int ProcessMcCommand(const char *pRequest, char *pResponse);

private:
	int PtzControl(const char *pResid, int nCmd, int nParam);
	int RecordControl(const char *pResid, int nCmd, int nStreamType);

	static void TimerThread(unsigned long ulUser)
	{
		CRymcHelper *pThis = static_cast<CRymcHelper *>((void *)ulUser);
		if (pThis != NULL)
			pThis->OnTimer();
	}
	void OnTimer();

private:
	J_OS::CTimer m_timer;
	CDeviceControl m_deviceControl;
	typedef std::vector<std::string> RecordVec;
	RecordVec m_recordVec;
	J_OS::CTLock m_locker;
};

#endif //~__RYMC_HELPER_H_
